<?php

function db_connect (){
//函数用于链接数据库。

@$db=new mysqli ('127.0.0.1', 'bid', '121121', 'bid');
if (mysqli_connect_errno()){
echo '不能链接数据库，请重试。';
exit;
}

return $db;
}


function subject_status ($flag) {
	
	switch ($flag) {
		case 0: $status = "不需要";
		break;
		case 1: $status = "进行中";
		break;
		case 2: $status = "澄清中";
		break;
		case 3: $status = "报价完成";
		break;
		case 4: $status = "标书完成";
		break;
		case 5: $status = "完成";
		break;
	}
	
	return $status;
}

?>
